package com.ftg.learn.service;


import com.ftg.learn.mapper.QizuMapper;
import com.ftg.learn.pojo.Qizu;
import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.stereotype.Service;

        import java.util.List;

        @Service
        public class  QizuService {
            @Autowired
            QizuMapper qizuMapper;
            //查询加分页
            public List<Qizu> showall(int page, int limit){
                int begin = (page - 1)*limit;
                System.out.println(begin);
                System.out.println(limit);
                return qizuMapper.showall(begin,limit);
            }
            //查一
            public List<Qizu> findone(String qizu_id, String qizu_bt){
                return qizuMapper.findone(qizu_id,qizu_bt);
            }
            // 共多少条
            public int getcount(){
                return qizuMapper.getcount();
    }
    //添加
    public int add(Qizu qizu){
        return qizuMapper.add(qizu);
    }
    //删除
    public int delete(String qizu_id){
        return qizuMapper.delete(qizu_id);
    }
    //修改
    public int update(Qizu qizu){
        return qizuMapper.update(qizu);
    }
}
